.class Lcom/instagram/android/directshare/g/a;
.super Landroid/widget/BaseAdapter;
.source "DirectSharePermalinkAdapter.java"


# instance fields
.field private final a:Landroid/content/Context;

.field private final b:Lcom/instagram/android/directshare/g/b;

.field private final c:Lcom/instagram/android/feed/a/a/ag;

.field private final d:Lcom/instagram/android/feed/a/b/z;

.field private final e:Lcom/instagram/android/feed/comments/ui/c;

.field private f:Lcom/instagram/j/l;

.field private g:Lcom/instagram/model/b/a;

.field private h:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/instagram/model/b/a;",
            ">;"
        }
    .end annotation
.end field

.field private i:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/instagram/j/b;",
            ">;"
        }
    .end annotation
.end field

.field private j:Z

.field private k:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Lcom/instagram/j/b;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method constructor <init>(Landroid/content/Context;Lcom/instagram/android/directshare/g/b;Lcom/instagram/android/feed/a/a/ag;)V
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 48
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 41
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/g/a;->i:Ljava/util/List;

    .line 43
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/g/a;->k:Ljava/util/Set;

    .line 50
    iput-object p1, p0, Lcom/instagram/android/directshare/g/a;->a:Landroid/content/Context;

    .line 51
    iput-object p2, p0, Lcom/instagram/android/directshare/g/a;->b:Lcom/instagram/android/directshare/g/b;

    .line 52
    iput-object p3, p0, Lcom/instagram/android/directshare/g/a;->c:Lcom/instagram/android/feed/a/a/ag;

    .line 53
    new-instance v0, Lcom/instagram/android/feed/a/b/z;

    invoke-direct {v0, p1, p2}, Lcom/instagram/android/feed/a/b/z;-><init>(Landroid/content/Context;Lcom/instagram/android/feed/a/b/ad;)V

    iput-object v0, p0, Lcom/instagram/android/directshare/g/a;->d:Lcom/instagram/android/feed/a/b/z;

    .line 54
    new-instance v0, Lcom/instagram/android/feed/comments/ui/c;

    invoke-direct {v0, p2}, Lcom/instagram/android/feed/comments/ui/c;-><init>(Lcom/instagram/android/feed/comments/ui/i;)V

    iput-object v0, p0, Lcom/instagram/android/directshare/g/a;->e:Lcom/instagram/android/feed/comments/ui/c;

    .line 55
    return-void
.end method

.method private a(ILandroid/view/ViewGroup;)Landroid/view/View;
    .locals 2
    .parameter
    .parameter

    .prologue
    .line 123
    invoke-virtual {p0, p1}, Lcom/instagram/android/directshare/g/a;->getItemViewType(I)I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 132
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->d:Lcom/instagram/android/feed/a/b/z;

    iget-object v1, p0, Lcom/instagram/android/directshare/g/a;->a:Landroid/content/Context;

    invoke-virtual {v0, v1, p2}, Lcom/instagram/android/feed/a/b/z;->a(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    :goto_0
    return-object v0

    .line 125
    :pswitch_0
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->a:Landroid/content/Context;

    invoke-static {v0, p2}, Lcom/instagram/android/feed/comments/ui/c;->a(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    .line 128
    :pswitch_1
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->a:Landroid/content/Context;

    invoke-static {v0, p2}, Lcom/instagram/android/directshare/g/ai;->a(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    .line 123
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method private a(ILandroid/view/View;)V
    .locals 6
    .parameter
    .parameter

    .prologue
    const/4 v3, 0x0

    .line 137
    invoke-virtual {p0, p1}, Lcom/instagram/android/directshare/g/a;->getItemViewType(I)I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 159
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/instagram/android/feed/a/b/ae;

    .line 160
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->d:Lcom/instagram/android/feed/a/b/z;

    iget-object v2, p0, Lcom/instagram/android/directshare/g/a;->f:Lcom/instagram/j/l;

    iget-object v4, p0, Lcom/instagram/android/directshare/g/a;->c:Lcom/instagram/android/feed/a/a/ag;

    iget-object v5, p0, Lcom/instagram/android/directshare/g/a;->f:Lcom/instagram/j/l;

    invoke-interface {v4, p1, v5}, Lcom/instagram/android/feed/a/a/ag;->a(ILcom/instagram/j/l;)Lcom/instagram/creation/video/ui/g;

    move-result-object v5

    move v4, v3

    invoke-virtual/range {v0 .. v5}, Lcom/instagram/android/feed/a/b/z;->a(Lcom/instagram/android/feed/a/b/ae;Lcom/instagram/j/l;IZLcom/instagram/creation/video/ui/g;)V

    .line 169
    :goto_0
    return-void

    .line 139
    :pswitch_0
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->i:Ljava/util/List;

    add-int/lit8 v1, p1, -0x2

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/j/b;

    .line 140
    iget-object v2, p0, Lcom/instagram/android/directshare/g/a;->e:Lcom/instagram/android/feed/comments/ui/c;

    iget-object v3, p0, Lcom/instagram/android/directshare/g/a;->a:Landroid/content/Context;

    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/instagram/android/feed/comments/ui/j;

    invoke-direct {p0, v0}, Lcom/instagram/android/directshare/g/a;->b(Lcom/instagram/j/b;)Lcom/instagram/android/feed/comments/ui/k;

    move-result-object v4

    invoke-virtual {v2, v3, v1, v0, v4}, Lcom/instagram/android/feed/comments/ui/c;->a(Landroid/content/Context;Lcom/instagram/android/feed/comments/ui/j;Lcom/instagram/j/b;Lcom/instagram/android/feed/comments/ui/k;)V

    goto :goto_0

    .line 149
    :pswitch_1
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->g:Lcom/instagram/model/b/a;

    iget-object v1, p0, Lcom/instagram/android/directshare/g/a;->h:Ljava/util/List;

    iget-object v2, p0, Lcom/instagram/android/directshare/g/a;->b:Lcom/instagram/android/directshare/g/b;

    invoke-static {p2, v0, v1, v2}, Lcom/instagram/android/directshare/g/ai;->a(Landroid/view/View;Lcom/instagram/model/b/a;Ljava/util/List;Lcom/instagram/android/directshare/g/al;)V

    goto :goto_0

    .line 137
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method private b(Lcom/instagram/j/b;)Lcom/instagram/android/feed/comments/ui/k;
    .locals 1
    .parameter

    .prologue
    .line 172
    iget-boolean v0, p0, Lcom/instagram/android/directshare/g/a;->j:Z

    if-eqz v0, :cond_1

    .line 173
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->k:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 174
    sget-object v0, Lcom/instagram/android/feed/comments/ui/k;->d:Lcom/instagram/android/feed/comments/ui/k;

    .line 180
    :goto_0
    return-object v0

    .line 175
    :cond_0
    invoke-static {p1}, Lcom/instagram/android/feed/e/a;->a(Lcom/instagram/j/b;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 176
    sget-object v0, Lcom/instagram/android/feed/comments/ui/k;->c:Lcom/instagram/android/feed/comments/ui/k;

    goto :goto_0

    .line 180
    :cond_1
    sget-object v0, Lcom/instagram/android/feed/comments/ui/k;->a:Lcom/instagram/android/feed/comments/ui/k;

    goto :goto_0
.end method


# virtual methods
.method public a()V
    .locals 1

    .prologue
    .line 72
    iget-boolean v0, p0, Lcom/instagram/android/directshare/g/a;->j:Z

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    iput-boolean v0, p0, Lcom/instagram/android/directshare/g/a;->j:Z

    .line 73
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->k:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->clear()V

    .line 74
    invoke-virtual {p0}, Lcom/instagram/android/directshare/g/a;->notifyDataSetChanged()V

    .line 75
    return-void

    .line 72
    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public a(Lcom/instagram/j/b;)V
    .locals 1
    .parameter

    .prologue
    .line 82
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->k:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 83
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->k:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z

    .line 88
    :goto_0
    invoke-virtual {p0}, Lcom/instagram/android/directshare/g/a;->notifyDataSetChanged()V

    .line 89
    return-void

    .line 85
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->k:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    goto :goto_0
.end method

.method public a(Lcom/instagram/j/l;)V
    .locals 2
    .parameter

    .prologue
    .line 58
    iput-object p1, p0, Lcom/instagram/android/directshare/g/a;->f:Lcom/instagram/j/l;

    .line 59
    invoke-virtual {p1}, Lcom/instagram/j/l;->ah()Lcom/instagram/model/b/a;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/directshare/g/a;->g:Lcom/instagram/model/b/a;

    .line 60
    invoke-virtual {p1}, Lcom/instagram/j/l;->ai()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/directshare/g/a;->h:Ljava/util/List;

    .line 65
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->i:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 66
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->i:Ljava/util/List;

    invoke-virtual {p1}, Lcom/instagram/j/l;->D()Lcom/instagram/j/f;

    move-result-object v1

    invoke-virtual {v1}, Lcom/instagram/j/f;->c()Ljava/util/List;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 68
    invoke-virtual {p0}, Lcom/instagram/android/directshare/g/a;->notifyDataSetChanged()V

    .line 69
    return-void
.end method

.method public b()Z
    .locals 1

    .prologue
    .line 78
    iget-boolean v0, p0, Lcom/instagram/android/directshare/g/a;->j:Z

    return v0
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 93
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->f:Lcom/instagram/j/l;

    if-eqz v0, :cond_0

    .line 95
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->i:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    add-int/lit8 v0, v0, 0x2

    .line 98
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 2
    .parameter "position"

    .prologue
    .line 104
    invoke-virtual {p0, p1}, Lcom/instagram/android/directshare/g/a;->getItemViewType(I)I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 113
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->f:Lcom/instagram/j/l;

    :goto_0
    return-object v0

    .line 106
    :pswitch_0
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->i:Ljava/util/List;

    add-int/lit8 v1, p1, -0x2

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    goto :goto_0

    .line 109
    :pswitch_1
    iget-object v0, p0, Lcom/instagram/android/directshare/g/a;->h:Ljava/util/List;

    goto :goto_0

    .line 104
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 119
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getItemViewType(I)I
    .locals 1
    .parameter "position"

    .prologue
    const/4 v0, 0x1

    .line 201
    if-le p1, v0, :cond_1

    .line 202
    const/4 v0, 0x2

    .line 206
    :cond_0
    :goto_0
    return v0

    .line 203
    :cond_1
    if-eq p1, v0, :cond_0

    .line 206
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 0
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 185
    if-nez p2, :cond_0

    .line 186
    invoke-direct {p0, p1, p3}, Lcom/instagram/android/directshare/g/a;->a(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 189
    :cond_0
    invoke-direct {p0, p1, p2}, Lcom/instagram/android/directshare/g/a;->a(ILandroid/view/View;)V

    .line 191
    return-object p2
.end method

.method public getViewTypeCount()I
    .locals 1

    .prologue
    .line 196
    const/4 v0, 0x3

    return v0
.end method
